
#include <iostream>
#include <list>

using namespace std; 


void slove()
{
	int n = 100;
	list<int>child;
	for (int i = 1; i <= n; ++i)
	{
		child.push_back(i-'0');
	}
	int cnt = 1;
	auto it = child.begin();
	//每次到9就删除
	while (!child.empty())
	{
		++cnt; it++;
		if (cnt % 9 == 0)
		{
			cout << *it << " ";
			//删除改节点
			it = child.erase(it);
			cnt = 1;
		}
	}

}

int main()
{
	slove();
	return 0;
}